1. Technical Field
This disclosure generally relates to computer systems, and more specifically relates to journaling in database systems.
2. Background Art
Database systems have been developed that allow a computer to store a large amount of information in a way that allows a user to search for and retrieve specific information in the database. For example, an insurance company may have a database that includes all of its policy holders and their current account information, including payment history, premium amount, policy number, policy type, exclusions to coverage, etc. A database system allows the insurance company to retrieve the account information for a single policy holder among the thousands and perhaps millions of policy holders in its database.
Database systems typically include a database manager that assures the integrity of the database as changes to the database are made. The database manager typically records changes to a database in a journal. The journal allows changes to the database to be rolled back, if needed. In addition, a journal may be used to replicate a database by applying the journaled changes to a remote database in the same order the journaled changes were made to the original database.
One known method for data replication transmits all journal entries from a source computer system to a target computer system. The journal entries are placed into a remote journal in the target computer system, which is typically read-only. The remote journal may then be used to replicate the database in the source computer system by applying the changes in the remote journal to the database in the target computer system. The remote journal on the target computer system is an exact duplicate of the journal on the source computer system. This approach assures all changes to the database on the source computer system are reflected in the replicated database in the target computer system.
There are circumstances where data in the source computer system needs to be accessed in a target computer system, but complete replication of the database would be very inefficient due to the relatively small amount of data of interest. One known approach in the prior art uses application software to read log entries, transmit the log entries of interest to a target computer system, write those log entries on the target computer system, and apply those log entries to the database in the target computer system. The problem with this approach is that none of the control or security features of the operating system are used. In addition, the remote log in this scenario is not read-only to the applications on the target computer system, which means local applications on the target computer system may also write to the log. This results in entries in the remote log that cannot be easily reconciled to the source computer system database because the sequence numbers may be different. As a result, there must be substantial intelligence in the application software to keep track of which entries in the remote log in the target computer system correspond to which log entries in the source computer system. Without a way to easily replicate a part of a database that is of interest in a way that is secure and has minimal overhead, the database industry will continue to suffer from inefficiencies in replicating a portion of a database between a source computer system and a target computer system.